# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=milkytracker
pkgver=1.03.00
pkgrel=0
pkgdesc="music tracker inspired by fast tracker 2"
url="https://milkytracker.titandemo.org/"
arch="all"
license="GPL-3.0-or-later"
depends=""
makedepends="
	alsa-lib-dev
	sdl2-dev
	zziplib-dev
	cmake
	ninja
"
checkdepends=""
install=""
subpackages="$pkgname-doc"
source="https://github.com/milkytracker/MilkyTracker/releases/download/v$pkgver/milkytracker-$pkgver.tar.gz"
builddir="$srcdir"
options="!check"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
		-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
		-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
		-DCMAKE_INSTALL_PREFIX=/usr
	ninja -C build
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

sha512sums="
dc5aee7fabab496c17c56229964de80fd55f97c01d2e3c45ce8786f41726ccc42670151c86f5cbc39c34e4870e1648217dcacc2a496f8b6528ecb6f43ccfa36b  milkytracker-1.03.00.tar.gz
"
